Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Mapping an environment with Copernicus
Description: Use of gmapping with CopernicusKeywords: Copernicus
Tutorial Level: INTERMEDIATE
Next Tutorial: Running AMCL with Copernicus
Mapping the Environment
The following tutorial illustrates the use of gmapping with Copernicus simulation. You will require the repository for Physical Robot here and the repository for Copernicus_Simulation here for this tutorial. You can also refer to this guide here on installing the repositories.
To learn more about move_base, gmapping and the navigation stack, refer to the Navigation tutorials.
Instructions:
- Once the gazebo world is launched and the Copernicus robot is loaded into the simulation environment, the mapping node can be launched by running:
$ roslaunch copernicus_navigation navigation.launch gmapping:=true
- This will launch the gmapping node. On a separate terminal, launch the rviz visualization tool by running:
$ rosrun rviz rviz
You can then open the copernicus configured rviz environment by opening the copernicus rviz config file, located under copernicus_navigation->rviz_config->navigation.rviz, from the rviz tool
- In order to control the robot, launch the teleoperation node by running:
$ roslaunch copernicus_teleoperator teleoperator.launch keyboard:=true
- As the robot moves, a grey static map will grow.
- Once the mapping of the entire environment is completed, the map can be saved by running:
$ cd ~/copernicus_ws/src/copernicus/copernicus_navigation/maps
$ rosrun map_server map_saver -f <filename>